﻿using AutoMapper;
using D.Medicalcare.Domain.Entities;
using D.Medicalcare.Write.API.Application.Commands.DoctorCommand;
using D.Medicalcare.Write.API.Application.Commands.PhysicalExaminationItem;
using D.Medicalcare.Write.API.Application.Commands.MenuCommand;
using D.Medicalcare.Write.API.Application.Commands.PatientCommand;
using D.Medicalcare.Write.API.Application.Commands.MessageCommand;
using D.Medicalcare.Write.API.Application.Commands.IntroductionHospital;
using D.Medicalcare.Write.API.Application.Commands.PackageTypeCommand;
using D.Medicalcare.Write.API.Application.Commands.TitleManagementCommand;
using D.Medicalcare.Write.API.Application.Commands.RoleCommand;
using D.Medicalcare.Write.API.Application.Commands.HealthCheckPackageCommand;
using D.Medicalcare.Write.API.Application.Handlers.DepartmentHarder;
using D.Medicalcare.Write.API.Application.Commands.DepartmentCommand;
using D.Medicalcare.Write.API.Application.Commands.UserCommand;
using D.Medicalcare.Write.API.Application.Commands.HospitalNavigationCommand;
using D.Medicalcare.Write.API.Application.Commands.NavigationinthehospitalCommand;

using D.Medicalcare.Write.API.Application.Commands.HeaEncyclopeCommand;
using D.Medicalcare.Write.API.Application.Commands.ReserInstrucCommand;
using D.Medicalcare.Write.API.Application.Commands.Instrufordelime;
using D.Medicalcare.Write.API.Application.Commands.RegistrationCommand;
using D.Medicalcare.Write.API.Application.Commands.IssueFeedbackCommand;
using D.Medicalcare.Write.API.Application.Commands.PhysicalexaminationCommand;
using D.Medicalcare.Write.API.Application.Commands.AccountbalanceCommand;
using D.Medicalcare.Write.API.Application.Commands.RefundCommand;
using D.Medicalcare.Write.API.Application.Handlers.PhysicalexaminationHarder;
using D.Medicalcare.Write.API.Application.Commands.DoctorSchedulingCommand;

namespace D.Medicalcare.Write.API
{
    /// <summary>
    /// 映射轮廓
    /// </summary>
    public class MappingProfile : Profile
    {
        /// <summary>
        /// //映射轮廓
        /// </summary>
        public MappingProfile()
        {
            

            //医生管理映射
            CreateMap<AddDoctorCommand, Doctor>().ReverseMap();
            CreateMap<UpdateDoctorCommand, Doctor>().ReverseMap();
            CreateMap<DelDoctorCommand, Doctor>().ReverseMap();
            //科室管理映射
            CreateMap<AddDepartmentCommand, Department>().ReverseMap();
            //套餐类型映射
            CreateMap<CreatePackageTypeCommand, PackageTypeModel>().ReverseMap();
            CreateMap<UpdatePackageTypeCommand, PackageTypeModel>().ReverseMap();
            CreateMap<DeletedPackageTypeCommand, PackageTypeModel>().ReverseMap();
            //体检项目映射
            CreateMap<AddPhysicalExaminationItemCommand, PhysicalExaminationItems>().ReverseMap();
            CreateMap<UpdatePhysicalExaminationItemCommand, PhysicalExaminationItems>().ReverseMap();
            CreateMap<DeletedPhysicalExaminationItemCommand, PhysicalExaminationItems>().ReverseMap();
            //职称管理映射
            CreateMap<AddTitleManagementCommand, TitleManagement>().ReverseMap();
            CreateMap<DeletedTitleManagementCommand, TitleManagement>().ReverseMap();
            CreateMap<UpdateTitleManagementCommand, TitleManagement>().ReverseMap();
            //医院简介映射
            CreateMap<IntroductionHospitalCommand, IntroductionHospitalModel>().ReverseMap();
    
            CreateMap<AddMenuCommand, Menu>().ReverseMap();
            //就诊人映射
            CreateMap<CreatePatientCommand, Patient>().ReverseMap();
            CreateMap<UpdateDoctorCommand, Doctor>().ReverseMap();
            CreateMap<DelDoctorCommand, Doctor>().ReverseMap();
            //消息公告映射
            CreateMap<CreateMessageCommand,Message>().ReverseMap();
    

            //角色管理
            CreateMap<AddRoleCommand,Role>().ReverseMap();
            CreateMap<UpdateRoleCommand,Role>().ReverseMap();
            //套餐新增映射
            CreateMap<AddHealthCheckPackageCommand, HealthCheckPackage>().ReverseMap();
            CreateMap<DeletedHealthCheckPackageCommand, HealthCheckPackage>().ReverseMap();

            //用户管理
            CreateMap<CreateUserCommand, User>().ReverseMap();
            ////病案须知
            CreateMap<AddInstrufordelimeCommand, Instrufordelime>().ReverseMap();
            //健康百科
            CreateMap<AddHeaEncyclopeCommand, HeaEncyclope>().ReverseMap();
            //预约须知      
            CreateMap<AddReserInstrucCommand, ReserInstruc>().ReverseMap();
            //医院导航
            CreateMap<AddHospitalNavigationCommand, HospitalNavigation>().ReverseMap();
            CreateMap<DeletedNavigationinthehospitalCommand, HospitalNavigation>().ReverseMap();
            CreateMap<UpdateNavigationinthehospitalCommand, HospitalNavigation>().ReverseMap();
            CreateMap<DeletedHospitalNavigationCommand, HospitalNavigation>().ReverseMap();
            CreateMap<DeletedHospitalNavigationCommand, HospitalNavigation>().ReverseMap();
            CreateMap<UpdPassUserCommand, User>().ReverseMap();
            CreateMap<UpdateHospitalNavigationCommand, HospitalNavigation>().ReverseMap();
            //预约管理
            CreateMap<AddRegistrationCommand, Registration>().ReverseMap();
            //问题反馈
            CreateMap<AddIssueFeedbackCommand, IssueFeedback>().ReverseMap();
            //预约体检
            CreateMap<AddPhysicalexaminationCommand, Physicalexamination>().ReverseMap();
            CreateMap<UpdatePhysicalexaminationHarder, Physicalexamination>().ReverseMap();
            //退款
            CreateMap<UpdateAccountbalanceCommand, Refund>().ReverseMap();
            //订单
            CreateMap<CreateAccountbalanceCommand, Accountbalance>().ReverseMap();
            //修改预约备注
            CreateMap<UpdateAccountbalanceCommand, Accountbalance>().ReverseMap();
            //医生排班
            CreateMap<AddDoctorSchedulingCommand, DoctorScheduling>().ReverseMap();
            //修改退款备注
            CreateMap<UpdateRemarkCommand, Accountbalance>().ReverseMap();
        }
    }
}
